package cn.echoedu.util;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class L { 
	static String filegroupname = "MySchoolLog";
	static String filetype = ".txt";
	public static void p(String msg){
//		String currentdate = DateUtil.dateToString(DateUtil.getCurrentDate());
//		String filegrouppath = PathUtil.getProjectParentPath()+File.separator
//				+filegroupname;
////		System.out.println(filegrouppath);
//		File filegroup = new File(filegrouppath);
//		if(!filegroup.exists()){
//			filegroup.mkdirs();
//		}
//		String filepath = PathUtil.getProjectParentPath()+File.separator
//				+filegroupname+File.separator+currentdate+filetype;
////		System.out.println(filepath);
//		File logfile = new File(filepath);
//		if(!logfile.exists()){
//			try {
//				logfile.createNewFile();
//			} catch (IOException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//				return;
//			}
//		}
//		StringBuilder stringbuilder = new StringBuilder();
//		StackTraceElement ste = new Throwable().getStackTrace()[1];
//		stringbuilder.append(msg);
//		stringbuilder.append(ste.getFileName()).append("------");
//		stringbuilder.append(ste.getMethodName()).append("-----");
//		stringbuilder.append(ste.getLineNumber()).append(":");
//		try {
//			FileWriter fwriter = new FileWriter(logfile,true);
//			fwriter.write(stringbuilder.toString());
//			fwriter.flush();
//			fwriter.close();
//		} catch (IOException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//			return;
//		}
		System.out.println(msg);
	}
	public static void gpi(String T){
		p(T+"getPreparedInsert");
	}
	public static void gpir(String T){
		p(T+"getPreparedInsertRunning");
	}
	public static void gp(String T){
		p(T+"getPojo");
	}
	public static void gpu(String T) {
		// TODO Auto-generated method stub
		p(T+"getPreparedUpdate");
	}
	public static void gljp(String T) {
		// TODO Auto-generated method stub
		p(T+"getLeftJoinPojo");
	}

}
